package io.renren.modules.jxgkteacher.dao;

import io.renren.modules.jxgkteacher.entity.TeacherCourseEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface TeacherCourseMapper {
    @Select("Select class_course_id,course_time,class_name,course_classroom_position," +
            "course_name,course_which_day,course_which_index " +
            "From class_course where course_teacher_id=#{teacherId} AND " +
            "course_academic_year=#{courseAcademicYear} AND " +
            "course_academic_term=#{courseAcademicTerm} AND " +
            "course_which_week=#{courseWhichWeek} ")
    List<TeacherCourseEntity> FindTeacherWeekCourseById(@Param("teacherId") String teacherId,
                                                        @Param("courseAcademicYear") String courseAcademicYear,
                                                        @Param("courseAcademicTerm") String courseAcademicTerm,
                                                        @Param("courseWhichWeek") String courseWhichWeek
                                                        );
    @Select("Select class_course_id,class_name" +
            " From class_course where course_teacher_id=#{teacherId} AND " +
            "course_time=#{courseTime} ")
    List<TeacherCourseEntity> FindTeacherCourseByTime(@Param("teacherId") String teacherId, @Param("courseTime") String courseTime);
}
